package cn.com.clearbus.controller;


//@RestController
public class UserController {



//    @Autowired
//    DiscoveryClient discoveryClient;


    /**
     * 打开eureka上对应的服务器,查看当前存在多少个服务
     * @return
     */
//    @GetMapping(value = "/user/discovery")
//    public Object discovery(){
//        List<String> services = discoveryClient.getServices();
//        System.out.println("services:"+services);
//        List<ServiceInstance> instances = discoveryClient.getInstances("CLEARBUS-USER");
//        for (ServiceInstance instance : instances) {
//            System.out.println(instance.getServiceId()+"\t"+instance.getHost()+"\t"+instance.getPort()+"\t"+instance.getUri());
//        }
//        return this.discoveryClient;
//    }
}
